<div class="p_ihot">
    <h4>热门资讯</h4>
    <ul>
        <?php foreach ($hots as $hot) :?>
        <li><a href="index.php?r=infoContent/show&id=<?php echo $hot->id;?>" 
               title="<?php echo CHtml::encode($hot->title);?>">
        <?php 
            $title = $hot->title;
            if (strlen($title) > 10)
            {
            echo CHtml::encode(mb_substr($title,0,7,'utf8')).'...';
            } else {
            echo CHtml::encode($hot->title);
            }
            
        ?><br />
        <span><?php echo CHtml::encode(date('Y-n-j G:i:s',$hot->create_time)); ?></span>
            </a>
        </li>
        <?php endforeach?>
     </ul>
</div>